package svc

import (
	"godco/internal/config"
	a "godco/internal/model/auth"
	r "godco/internal/model/result"
	u "godco/internal/model/users"
)

type ServiceContext struct {
	Config      config.Config
	UserModel   u.UserModel
	AuthModel   a.AuthModel
	ResultModel r.DcoResultModel
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:      c,
		UserModel:   u.NewUserModel(c.MonDB.Url, c.MonDB.DbName, "user"),
		AuthModel:   a.NewAuthModel(c.MonDB.Url, c.MonDB.DbName, "auth"),
		ResultModel: r.NewDcoResultModel(c.MonDB.Url, c.MonDB.DbName, "result"),
	}
}
